package com.example.paper.mvp.presenter;

import com.example.mvp.model.BaseEntity;
import com.example.mvp.presenter.BasePresenter;
import com.example.paper.R;
import com.example.paper.brean.UserIteamEntivy;
import com.example.paper.brean.UserMenuEntivy;
import com.example.paper.mvp.contract.IUserContract;

import java.util.ArrayList;
import java.util.List;

import io.reactivex.annotations.NonNull;

public class UserPresenter extends BasePresenter<IUserContract.IUserModel,IUserContract.IUserView> {

    public UserPresenter(IUserContract.IUserModel mModel, IUserContract.IUserView mView) {
        super(mModel, mView);
    }

    //初始化数据方法
    public void initData(){
        List<UserMenuEntivy> menuse = new ArrayList<>();
        menuse.add(new UserMenuEntivy(R.drawable.res_icon7_274,"消息",null));
        menuse.add(new UserMenuEntivy(R.drawable.res_icon7_275,"收藏",null));
        menuse.add(new UserMenuEntivy(R.drawable.res_icon7_277,"评论",null));
        menuse.add(new UserMenuEntivy(R.drawable.res_icon7_276,"历史",null));
        menuse.add(new UserMenuEntivy(R.drawable.res_icon7_278,"关注",null));
        menuse.add(new UserMenuEntivy(R.drawable.res_icon7_279,"下载",null));
        menuse.add(new UserMenuEntivy(R.drawable.res_icon7_280,"公益",null));
        menuse.add(new UserMenuEntivy(R.drawable.res_icon7_281,"问政",null));
        mView.refreshMenu(menuse);

        //添加数据和布局图片
        List<UserIteamEntivy> itemes = new ArrayList<>();
        itemes.add(new UserIteamEntivy("积分商城",null));
        itemes.add(new UserIteamEntivy("夜间模式",null));
        itemes.add(new UserIteamEntivy("一按反馈",null));
        itemes.add(new UserIteamEntivy("更多设置",null));
        mView.refreshItemes(itemes);
    }

    @Override
    public void onNext(@NonNull BaseEntity baseEntity) {

    }
}
